home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / L-M / LogoMation 1.0.1 ƒ / Examples / Add⁄Sub Tutor / Add_Sub Tutor
Encoding:
Text File  |  1993-02-28  |  664 b   |  35 lines

  1. Library ":Lib:Add/Sub Tutor.lib"
  2.  
  3. init()
  4. makeStar()
  5.  
  6. goodAnswers = 0
  7. badAnswers   = 0
  8. bCount = 0
  9. Repeat question,1,10
  10.     If random(1) > 0.5
  11.         ok = AddQuestion()
  12.     Else
  13.         ok = SubQuestion()
  14.     If r = ""
  15.         Halt
  16.     If ok
  17.         goodAnswers = goodAnswers+1
  18.         rollStar(goodAnswers)
  19.     Else
  20.         badAnswers = badAnswers+1
  21.         If goodAnswers > bCount
  22.             bCount = bCount + 1
  23.             dropStar(bCount)
  24.         Else
  25.             Sound "Goofed up somewhere"
  26.             
  27. If badAnswers = 0
  28.     Sound "Excellent",nowait
  29. Else
  30.     If goodAnswers = 0
  31.         Sound "Oh dear"
  32.     Else
  33.         Sound "Woo Woo Woo Hoo",nowait
  34.  
  35. Score()